/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author thynk
 */

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;

public class AddInventoryPanel extends JPanel {
    JLabel nameLabel, quantityLabel;
    JTextField nameField, quantityField;

    public AddInventoryPanel() {

        // set Layout
        nameLabel = new JLabel("Name");
        nameField = new JTextField();
        quantityLabel = new JLabel("Quantity");
        quantityField = new JTextField();

        add(nameLabel);
        add(nameField);
        add(quantityLabel);
        add(quantityField);
    }

    public Dimension getPreferredSize() {
        return new Dimension(350, 200);
    }

    public Dimension getMinimumSize() {
        return new Dimension(350, 200);
    }

    public void doLayout() {
        nameLabel.setBounds(10, 10, 60, 30);
        nameField.setBounds(70, 15, 270, 20);
        quantityLabel.setBounds(10, 40, 60, 30);
        quantityField.setBounds(70, 45, 270, 20);
    }

    public void reset() {
        quantityField.setText("");
    }
}
